package com.etc.test;

import java.util.List;

import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.etc.bean.User;
import com.etc.dao.UserDAO;
import com.etc.service.UserService;

public class test {
	ApplicationContext context;
	UserService us;
	@Before
	public void init(){
		context=new ClassPathXmlApplicationContext("applicationContext.xml");
		us=(UserService) context.getBean("userServiceImpl");
	}
	
	@Test
	public void sdfsdTEst()
	{
		List<User> list=us.getAllUser();
		for (User user : list) {
			System.out.println(user);
		}
	}

}
